<form name="setAssetScriptForm" novalidate>

    <w-asset-info-head  class="asset-modal margin-4" ng-cloak asset-id="$ctrl.state.assetId"></w-asset-info-head>

    <div class="line">
        <div class="basic-500" w-i18n="directives.filter.helpIcon.assetId"></div>
        <div class="basic-900 break-all fs-mobile ng-binding">{{$ctrl.asset.id}}</div>
    </div>

    <div class="body-2 margin-top-1 margin-05" w-i18n="modal.setAssetScript.script"></div>
    <w-input-container>
        <w-input textarea
                 name="script"
                 ng-model="$ctrl.script"
                 w-validate
                 required
                 class="setAssetScript__input"
                 w-validator-custom="{{$ctrl.isValidScript}}"></w-input>

        <w-input-error message="required">
            <span w-i18n="directives.scriptForm.errors.required"></span>
        </w-input-error>
        <w-input-error message="custom">
            <span w-i18n="directives.scriptForm.errors.invalidScript"></span>
        </w-input-error>
    </w-input-container>

    <div class="basic-500 margin-1 margin-top-1" w-i18n="directives.scriptForm.ideLink"></div>

    <div class="plate-warning warning-500">
        <span class="body-1" w-i18n="modal.setAssetScript.warningHeader"></span>
        <span class="footnote-1 basic-500" w-i18n="modal.setAssetScript.warningDescription"></span>
    </div>

    <div class="basic-500 margin-top-2"
         params="{fee: $ctrl.fee}"
         w-i18n="directives.setAssetScriptForm.fee"></div>

    <div ng-if="!$ctrl.hasFee"
         params="{fee: $ctrl.fee}"
         class="error-400 margin-top-1"
         w-i18n="modal.setAssetScript.errorNoMoney"></div>

    <w-sign-button on-click="$ctrl.onClickSign()"
                   disabled="setAssetScriptForm.$invalid || $ctrl.isPendingScrip || !$ctrl.hasFee"
                   on-success="$ctrl.onSuccess({signable: signable})"
                   class="submit big long margin-top-3">
        <span w-i18n="directives.setAssetScriptForm.ok"></span>
    </w-sign-button>
</form>
